﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="user.ascx.cs" Inherits="user" %>
<script language="javascript" >

var AccountType = 1;
    function testRePass()
    {
        var RePass =  document.getElementById("ctl00_ctl05_tb_Repassword");
        var Pass =  document.getElementById("ctl00_ctl05_tb_Password");
        var validRepass = document.getElementById("valid_repass");
        var btnSub = document.getElementById("ctl00_ctl05_btn_Registr");
        if((RePass.value != Pass.value) || (RePass.value.length < 5) || (Pass.value.length < 5))
        {
            validRepass.style.color = "Red";
            btnSub.disabled = "disabled";
        }
        else
        {   
            validRepass.style.color = "Green";
            btnSub.disabled = "";
        }
    }
        
    function CheckAccType(arg)
    {
        switch(arg)
        {
            case '1':
                AccountType = 1;
                document.getElementById("ctl00_ctl05_rb_fiz").checked = "checked";
                document.getElementById("ctl00_ctl05_rb_ur").checked = "";
                document.getElementById("ur1").style.display = "none";
                document.getElementById("ur2").style.display = "none";
                document.getElementById("ur3").style.display = "none";
                document.getElementById("ur4").style.display = "none";
                document.getElementById("ur5").style.display = "";
                document.getElementById("ur6").style.display = "none";
                document.getElementById("ur7").style.display = "none";
                document.getElementById("ur8").style.display = "none";
                document.getElementById("fz1").style.display = "";
                
                break;
            case '2':
                AccountType = 2;
                document.getElementById("ctl00_ctl05_rb_ur").checked = "checked";
                document.getElementById("ctl00_ctl05_rb_fiz").checked = "";
                document.getElementById("ur1").style.display = "";
                document.getElementById("ur2").style.display = "";
                document.getElementById("ur3").style.display = "";
                document.getElementById("ur4").style.display = "";
                document.getElementById("ur5").style.display = "none";
                document.getElementById("ur6").style.display = "";
                document.getElementById("ur7").style.display = "";
                document.getElementById("ur8").style.display = "";
                document.getElementById("fz1").style.display = "none";
                break;                
        }
    }
</script>



<table class="advm_table">
<tr valign="top">
    <td colspan="2" class="advm_td">Регистрация:</td>
</tr>
<tr id="ur1" style="display: none;">
    <td class="um_cell" align="right"></td>
    <td class="um_cell2">Контактное лицо</td>
</tr>
<tr>
    <td class="um_cell" align="right"><strong>E-mail</strong>&nbsp;*</td>
    <td class="um_cell2"><asp:TextBox ID="tb_NickName" CssClass="um_textb" runat="server" /></td>
</tr>
<tr>
    <td class="um_cell" align="right"><strong>Фамилия</strong>&nbsp;*</td>
    <td class="um_cell2"><asp:TextBox ID="tb_Fname" CssClass="um_textb" runat="server" /></td>
</tr>
<tr>
    <td class="um_cell" align="right"><strong>Имя</strong>&nbsp;*</td>
    <td class="um_cell2"><asp:TextBox ID="tb_Iname" CssClass="um_textb" runat="server" /></td>
</tr>
<tr>
    <td class="um_cell" align="right"><strong>Отчество</strong>&nbsp;*</td>
    <td class="um_cell2"><asp:TextBox ID="tb_Oname" CssClass="um_textb" runat="server" /></td>
</tr>
<tr>
    <td class="um_cell" align="right"><strong>E-mail(конт.)</strong>&nbsp;*</td>
    <td class="um_cell2"><asp:TextBox ID="tb_Email" CssClass="um_textb" runat="server" /></td>
</tr>
<tr id="fz1">
    <td class="um_cell" align="right">Пол</td>
    <td class="um_cell2">
        <asp:DropDownList ID="ddl_Sex" CssClass="um_tbox" runat="server" >
            <asp:ListItem Value="1" Text="Муж." />
            <asp:ListItem Value="0" Text="Жен." />
        </asp:DropDownList>
    </td>
</tr>
<tr>
    <td class="um_cell" align="right"><strong>Тип аккаунта</strong></td>
    <td class="um_cell2">
        <asp:RadioButton ID="rb_fiz" Checked="true" onclick="CheckAccType('1');" runat="server" Text="Физическое лицо" /><br />
        <asp:RadioButton ID="rb_ur" onclick="CheckAccType('2');" runat="server" Text="Компания" /> 
    </td>
</tr>
<tr id="ur2" style="display: none;">
    <td class="um_cell" align="right"><strong>Организация</strong>&nbsp;*</td>
    <td class="um_cell2"><asp:TextBox ID="tb_Organization" CssClass="um_textb" runat="server" /></td>
</tr>
<tr id="ur3" style="display: none;">
    <td class="um_cell" align="right"><strong>Код ЕДРПОУ</strong>&nbsp;*</td>
    <td class="um_cell2"><asp:TextBox ID="tb_Erdpou" CssClass="um_textb" runat="server" /></td>
</tr>
<tr>
    <td class="um_cell" align="right">Страна</td>
    <td class="um_cell2">
        <asp:DropDownList ID="ddl_Country" CssClass="um_textb" runat="server" >
            <asp:ListItem Value="ua" Text="Украина" />
            <asp:ListItem Value="ru" Text="Россия" />
        </asp:DropDownList>
    </td>
</tr>
<tr>
    <td class="um_cell" align="right"><strong>Zip(почтовый индекс)</strong>&nbsp;*</td>
    <td class="um_cell2"><asp:TextBox ID="tb_Zip" CssClass="um_textb" runat="server" /></td>
</tr>
<tr>
    <td class="um_cell" align="right">Город</td>
    <td class="um_cell2">
        <asp:DropDownList ID="ddl_City" CssClass="um_textb" runat="server" >
            <asp:ListItem Value="0" Text="Киев" />
            <asp:ListItem Value="1" Text="Алчевск" />
            <asp:ListItem Value="2" Text="Белая Церковь" />
            <asp:ListItem Value="3" Text="Бердянск" />
            <asp:ListItem Value="4" Text="Винница" />
            <asp:ListItem Value="5" Text="Днепродзержинск" />
            <asp:ListItem Value="6" Text="Днепропетровск" />
            <asp:ListItem Value="7" Text="Донецк" />
            <asp:ListItem Value="8" Text="Житомир" />
            <asp:ListItem Value="9" Text="Запорожье" />
            <asp:ListItem Value="10" Text="Ивано-Франковск" />
            <asp:ListItem Value="11" Text="Каменец-Подольский" />
            <asp:ListItem Value="12" Text="Керчь" />
            <asp:ListItem Value="13" Text="Кировоград" />
            <asp:ListItem Value="14" Text="Краматорск" />
            <asp:ListItem Value="15" Text="Красный Луч" />
            <asp:ListItem Value="16" Text="Кременчуг" />
            <asp:ListItem Value="17" Text="Кривой Рог" />
            <asp:ListItem Value="18" Text="Луганск" />
            <asp:ListItem Value="19" Text="Луцк" />
            <asp:ListItem Value="20" Text="Лвов" />
            <asp:ListItem Value="21" Text="Макеевка" />
            <asp:ListItem Value="22" Text="Мариуполь" />
            <asp:ListItem Value="23" Text="Нежин" />
            <asp:ListItem Value="24" Text="Николаев" />
            <asp:ListItem Value="25" Text="Новая Каховка" />
            <asp:ListItem Value="26" Text="Одесса" />
            <asp:ListItem Value="27" Text="Полтава" />
            <asp:ListItem Value="28" Text="Ровно" />
            <asp:ListItem Value="29" Text="Севастополь" />
            <asp:ListItem Value="30" Text="Северодонецк" />
            <asp:ListItem Value="31" Text="Славутич" />
            <asp:ListItem Value="32" Text="Сумы" />
            <asp:ListItem Value="33" Text="Тернополь" />
            <asp:ListItem Value="34" Text="Ужгород" />
            <asp:ListItem Value="35" Text="Харьков" />
            <asp:ListItem Value="36" Text="Херсон" />
            <asp:ListItem Value="37" Text="Хмельницкий" />
            <asp:ListItem Value="38" Text="Червоноград" />
            <asp:ListItem Value="39" Text="Черкассы" />
            <asp:ListItem Value="40" Text="Чернигов" />
            <asp:ListItem Value="41" Text="Черновцы" />
            <asp:ListItem Value="42" Text="Южноукраинск" />
            <asp:ListItem Value="43" Text="Ялта" />
        </asp:DropDownList>       
    </td>
</tr>
<tr>
    <td class="um_cell" align="right"><strong>Адрес</strong>&nbsp;*</td>
    <td class="um_cell2"><asp:TextBox ID="tb_Address" CssClass="um_textb" runat="server"/></td>
</tr>
<tr id="ur6" style="display: none;">
    <td class="um_cell" align="right">Время работы</td>
    <td class="um_cell2"><asp:TextBox ID="tb_WorkTime" CssClass="um_textb" runat="server" /></td>
</tr>
<tr id="ur7" style="display: none;">
    <td class="um_cell" align="right">Web</td>
    <td class="um_cell2"><asp:TextBox ID="tb_Web" CssClass="um_textb" runat="server" /></td>
</tr>
<tr id="ur8" style="display: none;">
    <td class="um_cell" align="right">Логотип</td>
    <td class="um_cell2"><asp:FileUpload ID="fu_Logo" runat="server" /></td>
</tr>
<tr>
    <td class="um_cell" align="right">Контактный телефон</td>
    <td class="um_cell2"><asp:TextBox ID="tb_Phone" CssClass="um_textb" runat="server"/></td>
</tr>
<tr id="ur4" style="display: none;">
    <td class="um_cell" align="right">Факс</td>
    <td class="um_cell2"><asp:TextBox ID="tb_Faks" CssClass="um_textb" runat="server"/></td>
</tr>
<tr id="ur5" style="display:;">
    <td align="right">Дата рождения</td>
    <td>
        <select id="ddl_Day" runat="server">
            <option value="1" selected="selected">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
            <option value="7">7</option>
            <option value="8">8</option>
            <option value="9">9</option>
            <option value="10">10</option>
            <option value="11">11</option>
            <option value="12">12</option>
            <option value="13">13</option>
            <option value="14">14</option>
            <option value="15">15</option>
            <option value="16">16</option>
            <option value="17">17</option>
            <option value="18">18</option>
            <option value="19">19</option>
            <option value="20">20</option>
            <option value="21">21</option>
            <option value="22">22</option>
            <option value="23">23</option>
            <option value="24">24</option>
            <option value="25">25</option>
            <option value="26">26</option>
            <option value="27">27</option>
            <option value="28">28</option>
            <option value="29">29</option>
            <option value="30">30</option>
            <option value="31">31</option>
        </select>
        <select id="ddl_Month" runat="server">
            <option value="1" selected="selected">января</option>
            <option value="2">февраля</option>
            <option value="3">марта</option>
            <option value="4">апреля</option>
            <option value="5">мая</option>
            <option value="6">июня</option>
            <option value="7">июля</option>
            <option value="8">августа</option>
            <option value="9">сентября</option>
            <option value="10">октября</option>
            <option value="11">ноября</option>
            <option value="12">декабря</option>
        </select>
        <asp:DropDownList ID="ddl_Year" runat="server" />
    </td>
</tr>
<tr>
    <td class="um_cell" align="right"><strong>Пароль</strong>&nbsp;*</td>
    <td class="um_cell2"><asp:TextBox TextMode="Password" ID="tb_Password" runat="server" onchange="testRePass();" CssClass="um_textb" /><p style="font-size: 10px;">Не меньше 6ти симоволов!</p></td>
</tr>
<tr>
    <td class="um_cell" align="right"><strong>Подтверждение пароля</strong>&nbsp;**</td>
    <td class="um_cell2"><asp:TextBox TextMode="Password" ID="tb_Repassword" runat="server" onchange="testRePass();" CssClass="um_textb" /><span id="valid_repass" style="font-weight:bold; color: Red;">&nbsp;!&nbsp;</span></td>
</tr>
<tr>
    <td>
    </td>
    <td>
        <asp:Button id="btn_Registr" Text="Зарегистрировать" OnClick="SendRegisterRequest" style="width: 175px;" Enabled="false" runat="server" />
    </td>
</tr>
<tr>
    <td colspan="2" align="center">
        <div id="ValidBlock" style="color: Red;" runat="server">
        </div>
    </td>
</tr>
</table>
